﻿using System.Diagnostics;
using System.Web.Mvc;

namespace KM.Areas.REM
{
    public class REMAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "REM";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            //Trace.WriteLine("REM");
            context.MapRoute(
          "Danh sacch tin",
          "Tins/{Id}_{Name}",
          new { Controller = "News", action = "DanhSachNew", Id = UrlParameter.Optional, Name = "" }
      );
            context.MapRoute(
              "lien he",
              "Lien-He",
              new { Controller = "News", action = "LienHe" }
          );
            context.MapRoute(
              "gioi thieu",
              "Gioi-Thieu",
              new { Controller = "News", action = "GioiThieu" }
          );

            context.MapRoute(
               "chi tiet tin",
               "Tin/{Id}_{Name}",
               new { Controller = "News", action = "ChiTiet", Id = 0, Name = "" }
           );
            context.MapRoute(
                "chi tiet san pham",
                "San-Pham/{Id}_{Name}",
                new { Controller = "SanPham", action = "ChiTiet", Id = 0, Name = "" }
            );

            context.MapRoute(
                "REM_default1",
                "Danh-Muc/{Id}_{Name}",
                new { Controller = "SanPham", action = "DanhSach", Id = 0, Name = "" }
            );

            context.MapRoute(
                "REM_default",
                "{controller}/{action}/{id}",
                new { Controller = "Home", action = "Index", id = UrlParameter.Optional }
            );

        }
    }
}
